/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.agent.controller.salesman;

import com.shop.cereshop.agent.service.salesman.AgentSalesmanPackageService;
import com.shop.cereshop.commons.domain.salesman.CereAgentSalesmanPackage;
import com.shop.cereshop.commons.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 业务员套餐管理Controller
 */
@Slf4j
@RestController
@RequestMapping("salesman/package")
@Api(value = "业务员套餐管理", tags = "业务员套餐管理")
public class SalesmanPackageController {

  @Autowired
  private AgentSalesmanPackageService agentSalesmanPackageService;

  @ApiOperation(value = "业务员套餐查询")
  @GetMapping("/list")
  public Result<List<CereAgentSalesmanPackage>> getPackages() {
    return Result.success(agentSalesmanPackageService.getPackages());
  }

}
